package com.yihaodian.search.broker.shard;

import com.yihaodian.api.search.SearchException;
import com.yihaodian.api.search.SugRequest;
import com.yihaodian.api.search.SugResponse;

/**
 * 
 * all the query is based on a shard of an index.
 * 
 */
public interface ShardSearchService {

	/**
	 * search a shard of an index.
	 * 
	 * @param request
	 * @return
	 * @throws SearchException
	 */
	public ShardSearchResponse executeSearch(ShardSearchRequest request)
			throws SearchException;
	
	/**
	 * search a shard of an index.
	 * 
	 * @param request
	 * @return
	 * @throws SearchException
	 */
	public SugResponse executeSug(String indexName, String shardId, SugRequest request)
			throws SearchException;

//	/**
//	 * 
//	 * @param request
//	 * @return
//	 * @throws SearchException
//	 */
//	public QuerySearchResult executeQueryPhrase(ShardSearchRequest request)
//			throws SearchException;
//
//	/**
//	 * 
//	 * @param fetchReq
//	 * @return
//	 * @throws SearchException
//	 */
//	public FetchSearchResult executeFetchPhrase(FetchRequest fetchReq)
//			throws SearchException;
}
